<template>
  <div class="app-container">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>集成企业微信</span>
      </div>

      <el-tabs tab-position="left" style="height: 200px">
        <el-tab-pane label="通讯录管理">用户管理</el-tab-pane>
        <el-tab-pane label="配置管理">配置管理</el-tab-pane>
        <el-tab-pane label="角色管理">角色管理</el-tab-pane>
        <el-tab-pane label="定时任务补偿">定时任务补偿</el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>

<script>
export default {
  name: 'QYWeiXin',
  data() {
    return {
      // 表单参数
      sendForm: {
        toMail: undefined,
        subject: undefined,
        content: undefined
      },
      // 表单校验
      rules: {
        toMail: [
          { required: true, message: '收件地址不能为空', trigger: 'blur' }
        ],
        subject: [{ required: true, message: '主题不能为空', trigger: 'blur' }],
        content: [
          { required: true, message: '邮件内容不能为空', trigger: 'blur' }
        ]
      }
    }
  },
  created() {},
  methods: {
    /** 重置按钮操作 */
    reset() {
      this.sendForm = {
        toMail: undefined,
        subject: undefined,
        content: undefined
      }
      this.resetForm('form')
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs['form'].validate((valid) => {
        if (valid) {
          send(this.sendForm).then((response) => {
            this.$modal.msgSuccess(response.msg)
            this.reset()
          })
        }
      })
    }
  }
}
</script>
